package com.hiyee.goods.mapper;

import com.hiyee.api.mapper.MyMapper;
import com.hiyee.pojo.Product;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface ProductMapper extends MyMapper<Product> {
    /**
     * 根据 货品 id 查询商品列表
     *
     * @param Long id
     * @return List<Product>
     */
    public List<Product> getByGoodsId(@Param("goodsId")Long id);

    /**
     * 根据商品 id 查询商品
     *
     * @param Long productId
     * @return Product
     */
    public Product getById(@Param("product_id")Long productId);
}